# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-smmap
_pkgname=smmap2
pkgver=2.0.5
pkgrel=4
pkgdesc='A pure git implementation of a sliding window memory map manager.'
arch=('any')
url='https://github.com/gitpython-developers/smmap'
license=('BSD')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('1db8f8d508a7ca97fef27de87494d667663efd8a56829d4bb99f37c5dffedae4dae05f8a0312ae9e4c14aa1ba5aa5de5b9ee1425d464be6f4bb07934f1a7a9f1')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

